<?php
@session_start();
/*
 *  A Part of snock project
 *   Author king-of-war
 * Last modified 2009-4-20
 *
 */

 $root_path='../';   //set the root path for this file

include_once $root_path.'admin/smarty_config.php';
include_once $root_path.'admin/class/error.class.php';
include_once $root_path.'admin/class/member.class.php';


/*
 *
 * check identify
 */
include_once $root_path.'admin/class/verify.class.php';
$a=new verify($root_path);
$a->identity_check(2);
$error=new Errmsg();

$user=new member($root_path);
 /*
  * $fun: 1 means add sort
  * $fun: 0 means update sort
  */
  if(isset($_POST['Submit'])){
$name=$_POST['name'];
$pass=$_POST['pass'];
$group=$_POST['group'];
$mail=$_POST['mail'];
$line=$user->member_add('',$name,$pass,$group,$mail,1);
if($line){
	$info='添加成功';
	$error->error_chinese($info);
}else{
		$info='添加失败';
	$error->error_chinese($info);
}

}



 $smarty->display("member_add.html");
?>
